Where I should call [object release] ?

Posted by mongeta on Stack Overflow See other posts from Stack Overflow or by mongeta
Published on 2010-05-03T13:35:50Z Indexed on 2010/05/03 13:48 UTC
Read the original article Hit count: 257

Filed under:
|

Hello,

I've subclassed some UITextField and added some custom properties.

In a UITableViewController, in the ViewDiDLoad I init them, and in the cellForRowAtIndexPath I add them to the cell with [cell.contentView addSubview:customTextField];

Each cell has a different customTextField as all of them are very different.

Where I should call the [customTextField release] ?

After I add them to the cell view ?

If for example I call [self.tableView reloadData] my customTextField are going to be added again to the cell, so maybe I should change my approach in doing this ?

thanks for the orientation ...

regards,

r.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about memory-allocation